import request from '@/utils/request'

//统一字典下拉框查询
export function adminDict(params) {
    return request({
        url: `common/v1/adminDict`,
        params
    })
}

//查询商家申请列表
export function merchantList(params) {   
    return request({
        url: `/merchant/register/apply/list`,
        method: 'get',
        params
    })
}
//校验申请手机号
export function checkPhone(params) {
    return request({
        url: `/merchant/register/apply/check/phone`,
        method: 'get',
        params
    })
}
// 统一邀请人下拉框
export function referrer(params) {
    return request({
        url: `/common/v1/referrer`,
        method: 'get',
        params
    })
}
//查询神椰行业下拉框
export function industrySelect(params) {
    return request({
        url: `/common/v1/industry/select`,
        method: 'get',
        params
    })
}

//查询商家申请数量统计
export function statistics(params) {
    return request({
        url: `/merchant/register/apply/statistics`,
        method: 'get',
        params
    })
}

//新增 创建店铺
export function addMerchant(data) {
    return request({
      url: '/merchant/register/apply/add',
      method: 'post',
      data
    })
}
//审核商家
export function auditMerchant(data) {
    return request({
      url: '/merchant/register/apply/audit',
      method: 'post',
      data
    })
}
//查询店铺详情
export function merchantDetail(id) {
    return request({
        url: `/merchant/register/apply/detail/${id}`,
        method: 'get',
    })
}
//查询拒绝店铺详情
export function refuseMerchantDetail(id) {
    return request({
        url: `/merchant/register/apply/refuse/detail/${id}`,
        method: 'get',
    })
}
//更新手工录入拒绝商家信息
export function editMerchant(data) {
    return request({
        url: `/merchant/register/apply/edit`,
        method: 'put',
        data
    })
}


